<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Member extends MY_Controller {

	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see http://codeigniter.com/user_guide/general/urls.html
	 */
	public function index()
	{
		$this->load->view('Member/welcome_message');
	}
        
        /*
         * 注册用户列表
         */
        public function lists() {
            
            $this->data_package['module_name']="用户模块";
            $this->data_package['fisrt_nav'] = "用户管理";
            $this->data_package['second_nav'] = "注册用户";

            //加载公共视图
            $header = $this->parser->parse("Common/header",$this->data_package,TRUE);
            $navigation = $this->parser->parse("Common/navigation",$this->data_package,TRUE);
            $footer = $this->parser->parse("Common/footer",$this->data_package,TRUE);
//            
//            
            $site_info['header'] = $header;
            $site_info['navigation']=$navigation;
            $site_info['footer'] = $footer;
            

            $this->data_package=array_merge($this->data_package,$site_info);
            
            $this->parser->parse('Member/lists',$this->data_package);
        }
        
        
        
        /*
         * 认证用户列表
         * 
         */
        
        public function verified_list() {
            $this->data_package['module_name']="用户模块";
            $this->data_package['fisrt_nav'] = "用户管理";
            $this->data_package['second_nav'] = "认证用户";

            //加载公共视图
            $header = $this->parser->parse("Common/header",$this->data_package,TRUE);
            $navigation = $this->parser->parse("Common/navigation",$this->data_package,TRUE);
            $footer = $this->parser->parse("Common/footer",$this->data_package,TRUE);
//            
//            
            $site_info['header'] = $header;
            $site_info['navigation']=$navigation;
            $site_info['footer'] = $footer;
            

            $this->data_package=array_merge($this->data_package,$site_info);
            
            $this->parser->parse('Member/lists',$this->data_package);
        }
        
        
        /*
         * 
         * 用户详情
         * 
         */
        
        
        /*
         * 
         * 修改资料
         */
        
        /*
         * 删除资料
         */
        
        
        /*
         * 测试获取用户的信息
         */
        public function getUserInfo() {
            $config_rongyunapi['appkey']="e5t4ouvptdx5a";
            $config_rongyunapi['appSecret']="5rc0HnHCi5";
            $config_rongyunapi['format']="json";
            $this->load->library("rongyunapi",$config_rongyunapi);
            
            $res = $this->rongyunapi->getToken(1,"abcd","http://wx.qlogo.cn/mmopen/Q3auHgzwzM6kmS6LrosdQHCicd5yiaxZREJaU6b8gx5vghtSsgCicIniamHklXm7AeibTxPQGgvmDUgqRhsrTVZ1Pkw/0");
            
            print_r($res);
        }
}
